<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

    <meta name="applicable-device" content="mobile"/>
    <meta name="apple-mobile-web-app-capable" content="no"/>
    <!--<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">-->
    <meta name="format-detection" content="telephone=no"/>
    <script src="lib/flexible.js"></script>

    <link rel="stylesheet" href="css/all.css"/>
    <link rel="stylesheet" href="css/validform.css" />
    <script src="lib/jquery-1.9.1.min.js"></script>
    <script src="lib/jquery.cookie.js"></script>
    <script src="lib/Validform_v5.3.2.js"></script>
    <script src="js/hgNews.min.js"></script>


</head>
<body>
<!-- header -->
    <header class="header2">
        <a href="JavaScript:history.go(-1)" class="return"><img src="img/234d_03.png" /></a>
        <span class="word">登&nbsp;&nbsp;陆</span>
        <a href="register1.html" class="fun but-a">注册</a>
    </header>
<!-- /header -->
<!-- bodyer -->
<div class="placeholder"></div>
<div class="register">
    <div class="p">黑光通行证</div>
    <form class="register-form" action="" method="post">
        <div class="verify-text">
            <input class="heighuang-id input" name="username" type="text" placeholder="黑光网账号" datatype="*" errormsg="没有输入！" nullmsg="没有输入！"/>
        </div>
        <div class="verify-text verify-password">
            <input class="heighuang-id input" name="password" type="text" placeholder="密码" datatype="*" errormsg="没有输入！" nullmsg="没有输入！"/>
        </div>
        <p class="word">黑光论坛  黑光达人  黑光人才网用户皆可登录</p>
        <input class="register-button" id="btn_sub" type="button" value="登 录"/>
    </form>
    <div class="tel-register">
        <a class="tel-a" href="register1.html">用手机验证码登录</a>
        <a class="tel-a" href="amend_password_tel.html">忘记密码</a>
    </div>
    <div class="fast-register l-f">
        <div class="fast-word">其他方式登录</div>
        <a class="weixin l-f-g1" href="">
            <img src="img/23232w_03.png" alt="">
            <p>微信登录</p>
        </a>
        <a class="qq l-f-g1" href="">
            <img src="img/23324a_13.png" alt="">
            <p>QQ登录</p>
        </a>
    </div>

</div>
<!-- /bodyer -->
<script>
    $(".register-form").Validform({
        btnSubmit:"#btn_sub",
        url:hgNews.api.register2,
        data:$(".register-form").serializeArray(),
        tiptype:3,
        ajaxPost:true,
        callback:function(data){
            console.log(data);
            if (data.status == 1){
                window.location.href = "my_page.html";
                $.cookie('uid',data.data.uid, {expires: 7 , path: '/'});
                $.cookie('session_id',data.data.session_id, {expires: 7});
            }else{
                $(".verify-password .Validform_checktip").text("用户名或密码错误").css({"color":"red"});
                $(".heighuang-id").addClass("Validform_error");
            }
        }
    });
</script>
</body>
</html>
